package com.bq.gametrade.ui.activity;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

import com.bq.gametrade.R;
import com.bq.gametrade.ui.fragment.GuideNextFragment;
import com.chechezhi.ui.guide.AbsGuideActivity;
import com.chechezhi.ui.guide.SinglePage;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Feel on 2016/11/28 10:23
 */

public class GuideActivity extends AbsGuideActivity {


    @Override
    public List<SinglePage> buildGuideContent() {

        List<SinglePage> guideContent = new ArrayList<>();

        SinglePage page1 = new SinglePage();
        page1.mBackground = getResources().getDrawable(R.mipmap.bg_page_01);
        guideContent.add(page1);

        SinglePage page2 = new SinglePage();
        page2.mBackground = getResources().getDrawable(R.mipmap.bg_page_03);
        guideContent.add(page2);

        SinglePage page4 = new SinglePage();
        page4.mCustomFragment = new GuideNextFragment();
        guideContent.add(page4);

        return guideContent;
    }



    @Override
    public Bitmap dotDefault() {
        return BitmapFactory.decodeResource(getResources(),R.mipmap.ic_dot_default);
    }

    @Override
    public Bitmap dotSelected() {
        return  BitmapFactory.decodeResource(getResources(),R.mipmap.ic_dot_selected);
    }


    @Override
    public boolean drawDot() {
        return true;
    }

    public void entryApp() {
        // Time to entry your app! We just finish the activity, replace it with
        // your code.
        startActivity(new Intent(GuideActivity.this,MainActivity.class));

        finish();
    }



    @Override
    public int getPagerId() {
        return R.id.guide_container;
    }

}
